<template>
	<view class="">
		<list-nav :list="list" @tonew="tonew"></list-nav>
		<navigation></navigation>
	</view>
</template>

<script>
	import listNav from '../../components/mine/listnav.vue'
	import navigation from '@/components/navigation/navigation.vue';
	export default {
		components:{listNav, navigation},
		data() {
			return {
				list:[
					{src:'https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/othertwo/mine_ts.png',title:'平台建议',ricon:'&#xe637;'},
					{src:'https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/othertwo/mine_sz.png',title:'账号信息',ricon:'&#xe637;'},
					{src:'https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/othertwo/mine_about.png',title:'关于我们',ricon:'&#xe637;'},
					{src:'https://ykp-new.oss-cn-hangzhou.aliyuncs.com/client/othertwo/mine_about.png',title:'退出',ricon:'&#xe637;'},
				]
			}
		},
		methods: {
			tonew(e) {
				switch (e){
					case 0:
						uni.navigateTo({
							url:'/pageA/settings/complaint'
						})
						break;
					case 1:
						uni.navigateTo({
							url:'/pageA/settings/mobile'
						})
						break;
					case 2:
						uni.navigateTo({
							url:'/pageA/settings/about'
						})
						break;
					case 3:
					uni.showModal({
						title: '温馨提示',
						content: '您确定要退出吗？',
						success: res => {
							if(res.confirm) {
								uni.reLaunch({
									url: '/pages/index/login'
								})
							}
						}
					})
						break;
					default:
						break;
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	page {
		background-color: #F2F2F2;
	}
</style>
